package com.app.miwawa.api.system.entity.center;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.framework.common.api.entity.CommonEntityUUID;
import org.framework.common.api.support.annotation.Chosen;
import org.framework.common.api.support.annotation.ChosenType;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 系统管理－部门
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年2月7日 下午12:04:16
 * @version 1.0.2016
 */
@Entity @Table(name = "TB_SYSTEM_DEPTS")
public class Depts extends CommonEntityUUID {

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = -7365269723887746263L;

	// 部门类型（所属中心、所属门店）
	@Column(name = "type", length = 50, nullable = true)
	private String type;
	
	// 部门编码
	@Column(name = "code", length = 50, nullable = true)
	private String code;
	
	// 部门名称
	@Column(name = "name", length = 50, nullable = true)
	private String name;
	
	// 手机
	@Column(name = "mobile", length = 50, nullable = true)
	private String mobile;

	// 经理
	@Column(name = "manager", length = 50, nullable = true)
	private String manager;

	// 门店ID
	@Column(name = "shops_id", length = 50, nullable = true)
	private String shopsid;

	// 中心ID
	@Column(name = "center_id", length = 50, nullable = true)
	private String centerid;
	
	// 创建时间（创立时间）
	@Temporal(TemporalType.DATE)
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@Column(name = "create_date", nullable = true)
	private Date createDate;

	@Override
	@Chosen(type = ChosenType.VALUE)
	public String getId() {
		return super.getId();
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Chosen(type = ChosenType.TEXT)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	public String getShopsid() {
		return shopsid;
	}

	public void setShopsid(String shopsid) {
		this.shopsid = shopsid;
	}

	public String getCenterid() {
		return centerid;
	}

	public void setCenterid(String centerid) {
		this.centerid = centerid;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
}
